package com.usvisatrack.core.dao.model;

import java.util.Date;

import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;

import com.usvisatrack.core.common.DataObject;

public class EntityListener {
	@PrePersist
	public void prePersist(DataObject entity) {
		entity.setCreateDate(new Date());
		entity.setModifyDate(new Date());
	}

	@PreUpdate
	public void preUpdate(DataObject entity) {
		entity.setModifyDate(new Date());
	}
}
